package client;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class MainClient {
    public static void main(String[] args) throws Exception {
        System.out.println("客户端");
        Socket socket = new Socket("127.0.0.1", 5566);
        try {
            BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
            PrintWriter out = new PrintWriter(new BufferedOutputStream(socket.getOutputStream()));

            new ThreadRead4Client(in).start();
            new ThreadWrite4Client(out).start();
            System.out.println("客户端连接初始化完成");


        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
